<%@ page import="linuxbox.BoxStatic" %>
<%@ page import="linuxbox.common.*" %>
<%@ page import="linuxbox.exception.LinuxboxException" %>
<%@ page import="javax.servlet.jsp.JspException" %>
<%@ page import="java.util.*" %>
<%@ page errorPage="/en/jsp/error.jsp" %>
<%
  session = request.getSession(false);
  BoxSession sec = (BoxSession)session.getAttribute("BoxSession");
  String homePage = "/"+BoxStatic.contextName+ "/index.jsp";
  String serviceOffPage = "/"+BoxStatic.defaultLang+"/" + BoxStatic.SERVICE_OFF_PAGE;
  String ROOT = request.getContextPath();

  if (sec == null) { %>
      <jsp:forward page="<%=homePage%>">
        <jsp:param name="ErrorMsg" value="Time out! Please login again!" />
      </jsp:forward>
  <%    /*session.setAttribute(BoxStatic.EXCEPTION, LinuxboxException.NO_USER);
        throw new JspException();*/
    }

    int curID = sec.getID();
    String curUserID = sec.getLoginID();

    String boxName = "Net.O.Box";
    if (!BoxStatic.serviceSwitch)
    {
      if (!sec.isSystemAdmin())
      {
%>
      <jsp:forward page="<%=serviceOffPage%>" />
<%
      }
    }
%>
